//
//  XYClassfySelectModel.swift
//  XYReadBook
//
//  Created by fox on 2017/9/7.
//  Copyright © 2017年 tsaievan. All rights reserved.
//

import UIKit
import ObjectMapper
class XYClassfySelectModel: BaseResponse {
    var total: Int = 0
    var books:[BookModel] = []
    var ok:Bool = true
    override func mapping(map: Map) {
        total                   <- map["total"]
        books                   <- map["books"]
        ok                      <- map["ok"]
    }
}


class BookModel: BaseResponse {
    var id: String = ""
    var author:String = ""
    var cover:String = ""
    var title:String = ""
    var shortIntro:String = ""
    var site:String = ""
    var majorCate:String = ""
    var minorCate:String = ""
    var banned:Int = 0
    var latelyFollower:Double = 0
    var retentionRatio:Double = 0
    var lastChapter:String = ""
    var tags:[String] = []
    
    override func mapping(map: Map) {
        id                          <- map["_id"]
        author                      <- map["author"]
        cover                       <- map["cover"]
        shortIntro                  <- map["shortIntro"]
        site                        <- map["site"]
        title                       <- map["title"]
        majorCate                   <- map["majorCate"]
        minorCate                   <- map["minorCate"]
        banned                      <- map["banned"]
        latelyFollower              <- map["latelyFollower"]
        retentionRatio              <- map["retentionRatio"]
        lastChapter                 <- map["lastChapter"]
        tags                        <- map["tags"]
        
    }
}
